'use strict';
module.exports = app => {
  app.beforeStart(async () => {
    console.log('hooks----------------', app.Sequelize.addHook);
    app.Sequelize.addHook('beforeDefine', () => {
      console.log('*************** beforeDefine ************')
    });
    // app.Sequelize.addHook('beforeDefine', attributes => {
    //   console.log('beforeDefine-------', attributes);
    //   Object.keys(attributes).forEach(key => {
    //     if (typeof attributes[key] !== 'function') {
    //       console.log('*******************', attributes[key].field);
    //       // attributes[key].field = key;
    //     }
    //   });
    // });
  });
  
};
